package com.fwj.portal.entity.notice;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: fwj
 * @Data: 2022/4/13 19:01
 * @Version 1.0
 * @Description:    库： museum0view_xxx(环境)     表名： notice
 */

@ApiModel(value="com.fwj.portal.entity.notice.Notice")
@Data
@Table( name = "notice")
public class Notice implements Serializable {

    /**
     * 主键
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    @ApiModelProperty(value="主键")
    private Long id;


    /**
     * 公告编号
     */
    @Column(name = "notice_number")
    @ApiModelProperty(value="公告编号")
    private Long noticeNumber;

    /**
     * 公告标题
     */
    @Column(name = "title")
    @ApiModelProperty(value="公告标题")
    @NotEmpty
    private String title;

    /**
     * 公告内容
     * */
    @Column(name = "content")
    @ApiModelProperty(value="公告内容")
    @NotEmpty
    private String content;

    /**
     * 公告等级
     * */
    @Column(name = "level")
    @ApiModelProperty(value="公告等级，越重要越靠前")
    @NotEmpty
    private String level;

    @ApiModelProperty(value="是否置顶")
    @NotEmpty
    @Transient
    private Boolean isTop;

    /**
     * 发布时间
     */
    @Column(name = "release_date")
    @ApiModelProperty(value="发布时间")
    @Temporal(TemporalType.TIMESTAMP)
    @NotEmpty
    private Date releaseDate;

    /**
     * 创建者
     */
    @Column(name = "creator")
    @ApiModelProperty(value="创建者")
    private Long creator;


    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value="创建时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value="更新时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    /**
     * 公告状态
     */
    @Column(name = "status")
    @ApiModelProperty(value="公告状态")
    private String status;

    private static final long serialVersionUID = 1485184445L;
}
